import { axiosPost , axiosGet } from '@/libs/https.js'

export function getDay (data) {
    return new Promise(( resolve , reject) => {
        axiosPost({
            url : '/api/calendar/day',
            data : {
                data
            },
            success (data) {
                resolve(data)
            },
            error (err) {
                reject(err)
            }
        })
    })
}

export function getMonth (month) {
    return new Promise(( resolve , reject) => {
        axiosPost({
            url : '/api/calendar/day',
            data : {
                'year-month' : month
            },
            success (data) {
                resolve(data)
            },
            error (err) {
                reject(err)
            }
        })
    })
}

export function getYear (year) {
    return new Promise(( resolve , reject) => {
        axiosPost({
            url : '/api/calendar/day',
            data : {
                year
            },
            success (data) {
                resolve(data)
            },
            error (err) {
                reject(err)
            }
        })
    })
}